﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DSZI
{
    class Memory
    {
        private static bool hatesSomething;
        private static string[] hates;
        private static bool wantsSomething;
        private static string[] wants;

        private Memory()
        {
            hatesSomething = false;
            hates = new string[2] { null, null };
            wantsSomething = false;
            wants = new string[2] { null, null };
        }

        public static Memory instance = new Memory();

        public void ForgetWhatUserHates()
        {
            hatesSomething = false;
            hates = new string[2] { null, null };
        }

        public void ForgetWhatUserWants()
        {
            wantsSomething = false;
            wants = new string[2] { null, null };
        }

        public bool UserHatesSomething()
        {
            return hatesSomething;
        }

        public bool UserWantsSomething()
        {
            return wantsSomething;
        }

        public void RememberUserHatesThis(string[] _hates)
        {
            hates[0] = _hates[0]; //miasto
            hates[1] = _hates[1]; //obiekt
            hatesSomething = true;
        }

        public void RememberUserWantsThis(string[] _wants)
        {
            wants[0] = _wants[0]; //miasto
            wants[1] = _wants[1]; //obiekt
            wantsSomething = true;
        }

        public string[] RemindWhatUserHates()
        {
            return hates;
        }

        public string[] RemindWhatUserWants()
        {
            return wants;
        }
    }
}
